package com.aplink.generic.pojo.googlemaps;

import com.aplink.generic.constant.type.TravelMode;
import com.google.android.gms.maps.model.LatLng;

public class DirectionRequest {
	private LatLng mDestination;
	private LatLng mOrigin;
	private TravelMode mTravelMode;

	public DirectionRequest(LatLng origin, LatLng destination,
	        TravelMode travelMode) {
		mOrigin = origin;
		mDestination = destination;
		mTravelMode = travelMode;
	}

	public LatLng getDestination() {
		return mDestination;
	}

	public LatLng getOrigin() {
		return mOrigin;
	}

	public String getRequestURL() {
		return "http://maps.googleapis.com/maps/api/directions/json?"
		        + "origin=" + mOrigin.latitude + "," + mOrigin.longitude
		        + "&destination=" + mDestination.latitude + ","
		        + mDestination.longitude + "&sensor=true&mode="
		        + mTravelMode.name();
	}

	public TravelMode getTravelMode() {
		return mTravelMode;
	}

	public void setDestination(LatLng destination) {
		mDestination = destination;
	}

	public void setOrigin(LatLng origin) {
		mOrigin = origin;
	}

	public void setTravelMode(TravelMode travelMode) {
		mTravelMode = travelMode;
	}
}
